/*
 * > /*
>  * INSANE - Interactive Structural Analysis Environment
>  *
>  * Copyright (C) 2003-2004
>  * Universidade Federal de Minas Gerais
>  * Escola de Engenharia
>  * Departamento de Engenharia de Estruturas
>  *
>  * Author's email :     insane@dees.ufmg.br
>  * Author's Website :   http://www.dees.ufmg.br/insane
>  *
>  * This program is free software; you can redistribute it and/or
>  * modify it under the terms of the GNU General Public License
>  * as published by the Free Software Foundation; either version 2
>  * of the License, or any later version.
>  *
>  * This program is distributed in the hope that it will be useful,
>  * but WITHOUT ANY WARRANTY; without even the implied warranty of
>  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
>  * GNU General Public License for more details.
>  *
>  * You should have received a copy of the GNU General Public License
>  * along with this program; if not, write to the Free Software
>  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-
> 1307, USA.
 *
 */

package br.ufmg.dees.insane.xyplot.xyplot_view;

import java.awt.Color;
import java.awt.Font;
import java.io.Serializable;

import br.ufmg.dees.insane.draw.MarkDraw;

/**
 * A class representing the state of the model.
 * @author   Penna, Samuel & Pitangueira, Roque
 * @see xyplot_view.InterfaceXYPlot
 * @see xyplot_view.DrawingArea
 * @since    april 2005
 */
public class SequenceViewState implements Serializable {   
    
    /**
     * Comment for <code>serialVersionUID</code>
     */  
    private static final long serialVersionUID = 1L;

    private String label;
    private Color   lineColor = Color.BLUE;
    private Color   markColor = Color.BLUE;
    private Color   titleColor = Color.BLUE;
    
    //private ArrayList lineColorsList = new ArrayList();
    //private ArrayList marksColorsList = new ArrayList();
    
    private boolean isMarkOn = true;
    private boolean isMarkTextOn = false;
    private byte    markType = MarkDraw.VLINE;
    private byte    markTextPlace = MarkDraw.NORTH;
    private int     markSize = 10;
    private int     markTextSize = 0;
    private String  markTextFont = "Monospaced";
    private byte    markTextStyle = Font.BOLD;

    private String titleFont = "Arial";
    private int titleFontSize = 10;
    private byte titleStyle = Font.PLAIN;
    private int jointStyle = 3;
    
    private boolean isLineOn = true;
    private byte lineType = 0;
    private float[] dash = {5.0f};
    private double lineWidth = 1.5f;
    
//  *************************************************************************************   
    /**
     * The class constructor 
     */
    public SequenceViewState() {
    }

//  *************************************************************************************    
    
    /**
	 * @return  Returns the lineColor.
	 * @uml.property  name="lineColor"
	 */
    public Color getLineColor(){
        return lineColor;
    }

    /**
	 * @param lineColor  The lineColor to set.
	 * @uml.property  name="lineColor"
	 */
    public void setLineColor(Color c){
        this.lineColor = c;
    }
    
//  *************************************************************************************    

    public boolean isMarksOn(){
        return isMarkOn;
    }
    
    public void setMarksOn(boolean m){
        this.isMarkOn =m;
    }
    
//  *************************************************************************************
    
    /**
	 * @return
	 * @uml.property  name="isMarkTextOn"
	 */
    public boolean isMarkTextOn(){
        return isMarkTextOn;
    }
    
    /**
	 * @param isMarkTextOn  The isMarkTextOn to set.
	 * @uml.property  name="isMarkTextOn"
	 */
    public void setMarkTextOn(boolean m){
        this.isMarkTextOn = m;
    }
    
//  *************************************************************************************
    
    /**
	 * @return  Returns the markType.
	 * @uml.property  name="markType"
	 */
    public byte getMarkType(){
        return markType;
    }
    
    /**
	 * @param markType  The markType to set.
	 * @uml.property  name="markType"
	 */
    public  void setMarkType(byte mt){
        this.markType = mt;
    }
    
//  *************************************************************************************   
    
    /**
	 * @return  Returns the markSize.
	 * @uml.property  name="markSize"
	 */
    public int getMarkSize(){
        return markSize;
    }
    
    /**
	 * @param markSize  The markSize to set.
	 * @uml.property  name="markSize"
	 */
    public  void setMarkSize(int ms){
        this.markSize = ms;
    }
    
//  *********************************************************************************   
    /**
	 * @return  Returns the markTextPlace.
	 * @uml.property  name="markTextPlace"
	 */
    public byte getMarkTextPlace(){
        return markTextPlace;
    }
    
    /**
	 * @param markTextPlace  The markTextPlace to set.
	 * @uml.property  name="markTextPlace"
	 */
    public  void setMarkTextPlace(byte mtp){
        this.markTextPlace = mtp;
    }

//  *********************************************************************************   
    
    /**
	 * @return  Returns the markTextSize.
	 * @uml.property  name="markTextSize"
	 */
    public int getMarkTextSize(){
        return markTextSize;
    }

    /**
	 * @param markTextSize  The markTextSize to set.
	 * @uml.property  name="markTextSize"
	 */
    public  void setMarkTextSize(int mts){
        this.markTextSize= mts;
    }
    
//  *********************************************************************************   
    
    /**
	 * @return  Returns the markTextFont.
	 * @uml.property  name="markTextFont"
	 */
    public String getMarkTextFont(){
        return markTextFont;
    }

    /**
	 * @param markTextFont  The markTextFont to set.
	 * @uml.property  name="markTextFont"
	 */
    public  void setMarkTextFont(String mtf){
        this.markTextFont = mtf;
    }
    
//  *********************************************************************************       

    /**
	 * @return  Returns the markTextStyle.
	 * @uml.property  name="markTextStyle"
	 */
    public byte getMarkTextStyle(){
        return markTextStyle;
    }

    /**
	 * @param markTextStyle  The markTextStyle to set.
	 * @uml.property  name="markTextStyle"
	 */
    public  void setMarkTextStyle(byte mts){
        this.markTextStyle= mts;
    }
    
//  *********************************************************************************       
    
	/**
	 * @return  Returns the markColor.
	 * @uml.property  name="markColor"
	 */
	public Color getMarkColor() {
		return markColor;
	}
	/**
	 * @param markColor  The markColor to set.
	 * @uml.property  name="markColor"
	 */
	public void setMarkColor(Color markColor) {
		this.markColor = markColor;
	}
	/**
	 * @return  Returns the titleFontSize.
	 * @uml.property  name="titleFontSize"
	 */
	public int getTitleFontSize() {
		return titleFontSize;
	}
	/**
	 * @param titleFontSize  The titleFontSize to set.
	 * @uml.property  name="titleFontSize"
	 */
	public void setTitleFontSize(int titleFontSize) {
		this.titleFontSize = titleFontSize;
	}
	/**
	 * @return  Returns the titleFont.
	 * @uml.property  name="titleFont"
	 */
	public String getTitleFont() {
		return titleFont;
	}
	/**
	 * @param titleFont  The titleFont to set.
	 * @uml.property  name="titleFont"
	 */
	public void setTitleFont(String titleFont) {
		this.titleFont = titleFont;
	}
	/**
	 * @return  Returns the titleStyle.
	 * @uml.property  name="titleStyle"
	 */
	public byte getTitleStyle() {
		return titleStyle;
	}
	/**
	 * @param titleStyle  The titleStyle to set.
	 * @uml.property  name="titleStyle"
	 */
	public void setTitleStyle(byte titleStyle) {
		this.titleStyle = titleStyle;
	}
	/**
	 * @return  Returns the lineType.
	 * @uml.property  name="lineType"
	 */
	public byte getLineType() {
		return lineType;
	}
	
	/**
	 * @param lineType  The lineType to set.
	 * @uml.property  name="lineType"
	 */
	public void setLineType(byte n) {
		this.lineType = n;
	}
	
	/**
	 * @return  Returns the dash.
	 * @uml.property  name="dash"
	 */
	public float[] getDash() {
		return dash;
	}
	/**
	 * @param lineType The lineType to set.
	 */
	public void setDash(int e) {
		
		switch(e){
		case(1):
		{   
			//solid
			this.lineType = 0;
			break;
		}
		case(2):
		{
			//dashed
			lineType = 1;
			dash = new float[2];
			dash[0] = 5f;
			dash[1] = 6f;
			break;
		}
		case(3):
		{
			//dotted
			lineType = 2;
			dash = new float[4];
			dash[0] = 0.1f;
			dash[1] = 5.0f;
			dash[2] = 0.1f;
			dash[3] = 5.0f;
			break;
			
		}
		case(4):
		{
			//dash_dot
			lineType = 3;
			dash = new float[4];
			dash[0] = 5.0f;
			dash[1] = 5.0f;
			dash[2] = 0.1f;
			dash[3] = 5.0f;
			break;			
		}
		case(5):
		{
			//dash_dot_dot
			lineType = 4;
			dash = new float[6];
			dash[0] = 5.0f;
			dash[1] = 5.0f;
			dash[2] = 0.1f;
			dash[3] = 5.0f;
			dash[4] = 0.1f;
			dash[5] = 5.0f;
			break;
		}
		case(6):
		{
			//dash_dot_dot_dot
			lineType = 5;
			dash = new float[8];
			dash[0] = 5.0f;
			dash[1] = 5.0f;
			dash[2] = 0.1f;
			dash[3] = 5.0f;
			dash[4] = 0.1f;
			dash[5] = 5.0f;
			dash[6] = 0.1f;
			dash[7] = 5.0f;
			break;
		}
		case(7):
		{
			lineType = 6;
			this.setLineOn(false);
			break;
		}
	}
   }
	/**
	 * @return  Returns the lineWidth.
	 * @uml.property  name="lineWidth"
	 */
	public double getLineWidth() {
		return lineWidth;
	}
	/**
	 * @param lineWidth  The lineWidth to set.
	 * @uml.property  name="lineWidth"
	 */
	public void setLineWidth(double lineWidth) {
		this.lineWidth = lineWidth;
	}
	/**
	 * @return  Returns the isLineOn.
	 * @uml.property  name="isLineOn"
	 */
	public boolean isLineOn() {
		return isLineOn;
	}
	/**
	 * @param isLineOn  The isLineOn to set.
	 * @uml.property  name="isLineOn"
	 */
	public void setLineOn(boolean isLineOn) {
		this.isLineOn = isLineOn;
	}
	
	
	/**
	 * @return  Returns the titleColor.
	 * @uml.property  name="titleColor"
	 */
	public Color getTitleColor() {
		return titleColor;
	}
	/**
	 * @param titleColor  The titleColor to set.
	 * @uml.property  name="titleColor"
	 */
	public void setTitleColor(Color titleColor) {
		this.titleColor = titleColor;
	}
	/**
	 * @return  Returns the jointStyle.
	 * @uml.property  name="jointStyle"
	 */
	public int getJointStyle() {
		return jointStyle;
	}
	/**
	 * @param jointStyle  The jointStyle to set.
	 * @uml.property  name="jointStyle"
	 */
	public void setJointStyle(int jointStyle) {
		this.jointStyle = jointStyle;
	}

	/**
	 * @return  Returns the label.
	 * @uml.property  name="label"
	 */
	public String getLabel() {
		return label;
	}

	/**
	 * @param label  The label to set.
	 * @uml.property  name="label"
	 */
	public void setLabel(String label) {
		this.label = label;
	}
}
